# Constructions for $K[G]$-Modules

The following functions provide for the construction of finite-dimensional $K[G]$-modules for a group $G$, where the action of $G$ is given in terms of a matrix representation of $G$. Note that an Euclidean Domain may appear in place of the field $K$.

## General $K[G]$-Modules

### `GModule(G, A): Grp, AlgMat -> ModGrp`

Let $G$ be a group defined on $r$ generators, let $K$ field and let $A$ be a subalgebra of the matrix algebra $M_n(K)$, also defined by $r$ non-singular matrices. It is assumed that the mapping from $G$ to $A$ defined by $\phi(G.i) \mapsto A.i$, for $i = 1, \ldots, r$, is a group homomorphism. Let $M$ be an $n$-dimensional vector space over $K$. The function constructs a $K[G]$-module $M$ of dimension $n$, where the action of the $i$-th generator of $G$ on $M$ is given by the $i$-th generator of $A$.

### `GModule(G, Q): Grp, [ GrpMatElt ] -> ModGrp`

Let $G$ be a group defined on $r$ generators, let $K$ be a field and let $Q$ be a sequence of $r$ invertible elements of $M_n(K)$ or $GL(n, K)$. It is assumed that the mapping from $G$ to $Q$ defined by $\phi(G.i) \mapsto Q[i]$, for $i = 1, \ldots, r$, is a group homomorphism from $G$ into the matrix algebra $A$ defined by the terms of $Q$. The function constructs a $K[G]$-module $M$ of dimension $n$, where the action of $G$ is defined by the matrix algebra $A$.

### `TrivialModule(G, K): Grp, Fld -> ModGrp`

Create the trivial $K[G]$-module for the group $G$.

### `Example: Create L27 (ex-93f8b4)`

We construct a $3$-dimensional module for ${\operatorname{PSL}}(2, 7)$ over ${\bf F}_{2}$. The action of the group on $M$ is described in terms of two elements, $x$ and $y$, belonging to the ring of $3 \times 3$ matrices over ${\bf F}_{2}$.

```magma
> PSL27 := PermutationGroup< 8 | (2,3,5)(6,7,8), (1,2,4)(3,5,6) >;
> S := MatrixAlgebra< FiniteField(2), 3 |
>        [ 0,1,0,  1,1,1,  0,0,1 ], [ 1,1,1,  0,1,1,  0,1,0 ] >;
> M := GModule(PSL27, S);
> M: Maximal;
GModule M of dimension 3 with base ring GF(2)
Generators of acting algebra:

[0 1 0]
[1 1 1]
[0 0 1]

[1 1 1]
[0 1 1]
[0 1 0]

```

### `Example: Create Matrices (ex-64e699)`

We write a function which, given a matrix algebra $A$, together with a matrix group $G$ acting on $A$ by conjugation (so $A$ is closed under action by $G$), computes the $G$-module $M$ representing the action of $G$ on $A$. We then construct a particular (nilpotent) upper-triangular matrix algebra $A$, a group $G = 1 + A$ which acts on $A$, and finally construct the appropriate $G$-module $M$.

```magma
> MakeMod := function(A, G)
>     // Make G-module M of G acting on A by conjugation
>     k := CoefficientRing(A);
>     d := Dimension(A);
>     S := RMatrixSpace(A, k);
>     return GModule(
>         G,
>         [
>             MatrixAlgebra(k, d) |
>             &cat[
>                 Coordinates(S, S.j^g): j in [1 .. d]
>             ] where g is G.i: i in [1 .. Ngens(G)]
>         ]
>     );
> end function;
>
> MakeGroup := function(A)
>     // Make group G from upper-triangular matrix algebra A
>     k := CoefficientRing(A);
>     n := Degree(A);
>     return MatrixGroup<n, k | [Eltseq(1 + A.i): i in [1 .. Ngens(A)]]>;
> end function;
>
> k := GF(3);
> n := 4;
> M := MatrixAlgebra(k, n);
> A := sub<M |
>      [0,2,1,1, 0,0,1,1, 0,0,0,1, 0,0,0,0],
>      [0,1,0,0, 0,0,2,2, 0,0,0,1, 0,0,0,0]>;
> G := MakeGroup(A);
> G;
MatrixGroup(4, GF(3)) of order 3^4
Generators:
    [1 2 1 1]
    [0 1 1 1]
    [0 0 1 1]
    [0 0 0 1]

    [1 1 0 0]
    [0 1 2 2]
    [0 0 1 1]
    [0 0 0 1]
> M := MakeMod(A, G);
> M: Maximal;
GModule M of dimension 5 over GF(3)
Generators of acting algebra:

[1 1 1 2 0]
[0 1 1 0 0]
[0 0 1 0 0]
[0 0 0 1 0]
[0 0 0 0 1]

[1 2 2 2 0]
[0 1 1 0 0]
[0 0 1 0 0]
[0 0 0 1 0]
[0 0 0 0 1]

```

## Natural $K[G]$-Modules

The following functions provide for the construction of $K[G]$-modules for a group $G$ in one of its natural actions. Note that an Euclidean Domain may be used in place of the field $K$.

### `GModule(G, K): GrpPerm, Rng -> ModGrp`

Given a finite permutation group $G$ and a field $K$, create the natural permutation module for $G$ over $K$.

### `GModule(G): GrpMat -> ModGrp`

Given a matrix group $G$ defined as a subgroup of the group of units of the ring $Mat_n(K)$, where $K$ is field, create the natural $K[G]$-module for $G$.

### `Example: Create M11 (ex-722ddf)`

Given the Mathieu group $M_{11}$ presented as a group of $5 \times 5$ matrices over ${\bf F}_{3}$, we construct the natural $K[G]$-module associated with this representation.

```magma
> G := MatrixGroup<5, FiniteField(3) |
>      [ 2,1,2,1,2,  2,0,0,0,2,  0,2,0,0,0,  0,1,2,0,1,  1,0,2,2,1],
>      [ 2,1,0,2,1,  1,2,0,2,2,  1,1,2,1,1,  0,2,0,1,1,  1,1,2,2,2] >;
> Order(G);
7920
>
> M := GModule(G);
> M : Maximal;
GModule M of dimension 5 with base ring GF(3)
Generators of acting algebra:

[2 1 2 1 2]
[2 0 0 0 2]
[0 2 0 0 0]
[0 1 2 0 1]
[1 0 2 2 1]

[2 1 0 2 1]
[1 2 0 2 2]
[1 1 2 1 1]
[0 2 0 1 1]
[1 1 2 2 2]

```

## Permutation Modules

The following functions provide for the construction of permutation modules for a group $G$. Note that an Euclidean Domain may be used in place of the field $K$.

### `PermutationModule(G, H, K): Grp, Grp, Fld -> ModGrp`

Given a group $G$, a subgroup $H$ of finite index in $G$ and a field $K$, create the $K[G]$-module for $G$ corresponding to the permutation action of $G$ on the cosets of $H$.

### `PermutationModule(G, K): Grp, Fld -> ModGrp`

Given a permutation group $G$ and a field $K$, create the natural permutation module for $G$ over $K$.

### `PermutationModule(G, V): Grp, ModTupFld -> ModGrp`

Given a permutation group $G$ of degree $n$ and an $n$-dimensional vector space $V$ defined over a field $K$, create the natural permutation module for $G$ over $K$.

### `PermutationModule(G, u): Grp, ModTupFldElt -> ModGrp`

Given a permutation group $G$ of degree $n$, and a vector $u$ belonging to the vector space $V = K^{(n)}$, where $K$ is a field, construct the $K[G]$-module corresponding to the action of $G$ on the $K$-subspace of $V$ generated by the set of vectors obtained by applying the permutations of $G$ to the vector $u$.

### `Example: Create M12 (ex-3c630c)`

We construct the permutation module for the Mathieu group $M_{12}$ over the field ${\bf F}_{2}$.

```magma
> M12 := PermutationGroup<12 |
>       (1,2,3,4,5,6,7,8,9,10,11),
>       (1,12,5,2,9,4,3,7)(6,10,11,8) >;
> M := PermutationModule(M12, FiniteField(2));
> M : Maximal;
GModule M of dimension 12 with base ring GF(2)
Generators of acting algebra:

[0 1 0 0 0 0 0 0 0 0 0 0]
[0 0 1 0 0 0 0 0 0 0 0 0]
[0 0 0 1 0 0 0 0 0 0 0 0]
[0 0 0 0 1 0 0 0 0 0 0 0]
[0 0 0 0 0 1 0 0 0 0 0 0]
[0 0 0 0 0 0 1 0 0 0 0 0]
[0 0 0 0 0 0 0 1 0 0 0 0]
[0 0 0 0 0 0 0 0 1 0 0 0]
[0 0 0 0 0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 0 0 0 0 1 0]
[1 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 1]

[0 0 0 0 0 0 0 0 0 0 0 1]
[0 0 0 0 0 0 0 0 1 0 0 0]
[0 0 0 0 0 0 1 0 0 0 0 0]
[0 0 1 0 0 0 0 0 0 0 0 0]
[0 1 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 1 0 0]
[1 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 1 0 0 0 0 0 0]
[0 0 0 1 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 1 0]
[0 0 0 0 0 0 0 1 0 0 0 0]
[0 0 0 0 1 0 0 0 0 0 0 0]

```

### `Example: Create A7 (ex-cffd45)`

We construct the constituent of the permutation module for the alternating group of degree $7$ that contains the vector $(1,0,1,0,1,0,1)$.

```magma
> A7 := AlternatingGroup(7);
> V  := VectorSpace(FiniteField(2), 7);
> x  := V![1,0,1,0,1,0,1];
> M  := PermutationModule(A7, x);
> M : Maximal;
GModule of dimension 6 with base ring GF(2)
Generators of acting algebra:

[1 0 1 0 0 0]
[0 0 1 0 1 0]
[0 1 1 0 0 0]
[0 0 1 0 0 0]
[0 0 1 1 0 0]
[0 0 1 0 0 1]

[0 0 0 0 0 1]
[0 1 0 0 0 0]
[1 0 0 0 0 0]
[0 0 0 1 0 0]
[0 0 0 0 1 0]
[0 0 1 0 0 0]

```

## Action on an Elementary Abelian Section

### `GModule(G, A, B): Grp, Grp, Grp -> ModGrp, Map`

### `GModule(G, A): Grp, Grp -> ModGrp, Map`

Given a group $G$, a normal subgroup $A$ of $G$ and a normal subgroup $B$ of $A$ such that the section $A/B$ is elementary abelian of order $p^n,$ create the $K[G]$-module $M$ corresponding to the action of $G$ on $A/B$, where $K$ is the field ${\bf F}_{p}$. If $B$ is trivial, it may be omitted. The function returns

**(a)**
the module $M$; and

**(b)**
the homomorphism $\phi : A/B \rightarrow M$.

### `Example: Create A4wr C3 (ex-e47a86)`

We construct a module $M$ for the wreath product $G$ of the alternating group of degree 4 with the cyclic group of degree 3. The module is given by the action of $G$ on an elementary abelian normal subgroup $H$ of order $64$.

```magma
> G := WreathProduct(AlternatingGroup(4), CyclicGroup(3));
> G := PCGroup(G);
> A := pCore(G, 2);
> A;
GrpPC of order 64 = 2^6
Relations:
A.1^2 = Id(A),
A.2^2 = Id(A),
A.3^2 = Id(A),
A.4^2 = Id(A),
A.5^2 = Id(A),
A.6^2 = Id(A)
> M := GModule(G, A, sub<G|>);
> M;
GModule of dimension 6 with base ring GF(2)

```

## Action on a Polynomial Ring

### `GModule(G, P, d): Grp, RngMPol, RngIntElt -> ModGrp, Map, {@ RngMPolElt @}`

Let $G$ be a permutation group of degree $n$ or a matrix group of degree $n$ over a field $K$, $P=K[x_1, \ldots, x_n]$ a polynomial ring in $n$ variables, and $d$ a non-negative integer. This function creates the $K[G]$-module $M$ corresponding to the action of $G$ on the space of homogeneous polynomials of degree $d$ of the polynomial ring $P$. The function also returns the isomorphism $f$ between the space of homogeneous polynomials of degree $d$ of $P$ and $M$, together with an indexed set of monomials of degree $d$ of $P$ which correspond to the columns of $M$.

### `GModule(G, I, J): Grp, RngMPol, RngMPol -> ModGrp, Map, {@ RngMPolElt @}`

Let $G$ be a permutation group of degree $n$ or a matrix group of degree $n$ over a field $K$, $I$ an ideal of a multivariate polynomial ring $P=K[x_1, \ldots, x_n]$ in $n$ variables over a field $K$, and $J$ a zero-dimensional subideal of $I$. This function creates the $K[G]$-module $M$ corresponding to the action of $G$ on the finite-dimensional quotient $I/J$. The function also returns the isomorphism $f$ between the quotient space $I/J$ and $M$, together with an indexed set of monomials of $P$, forming a (vector space) basis of $I/J$, and which correspond to the columns of $M$.

### `GModule(G, Q): Grp, RngMPolRes -> ModGrp, Map, {@ RngMPolElt @}`

Let $G$ be a permutation group of degree $n$ or a matrix group of degree $n$ over a field $K$ and $Q=I/J$ a finite-dimensional quotient ring of a multivariate polynomial ring $P=K[x_1, \ldots, x_n]$ in $n$ variables over a field $K$. This function creates the $K[G]$-module $M$ corresponding to the action of $G$ on the finite-dimensional quotient $Q$. The function also returns the isomorphism $f$ between the quotient ring $Q$ and $M$, together with an indexed set of monomials of $P$, forming a (vector space) basis of $Q$, and which correspond to the columns of $M$.

### `Example: Create Poly Action (ex-2611b9)`

Let $T$ be the polynomial ring in five indeterminates over $GF(5)$. We create the representation of the alternating group of degree $5$ that corresponds to its action on the space $H_4$ of homogeneous polynomials of degree $4$ of $T$.

```magma
> G := Alt(5);
> R<[x]> := PolynomialRing(GF(5), 5);
> M, f := GModule(G, R, 4);
> M;
GModule M of dimension 70 over GF(5)

```

Thus, the action of $Alt(5)$ on $H_4$ yields a $70$-dimensional module. We find its irreducible constituents.

```magma
> Constituents(M);
[
    GModule of dimension 1 over GF(5),
    GModule of dimension 3 over GF(5),
    GModule of dimension 5 over GF(5)
]
> t := x[1]^4 + x[2]^4 + x[3]^4 + x[4]^4 + x[5]^4;
> v := f(t); v;
M: (1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1)
> v@@f;
x[1]^4 + x[2]^4 + x[3]^4 + x[4]^4 + x[5]^4

```
